1. Field of the Invention
The present invention relates to a numerical controller for controlling a machine tool, and more particularly to a numerical controller for performing a learning control function adopted when the same operation pattern is repeated for machining.
2. Description of Related Art
In performing machining or the like in response to repeated issuance of commands of the same pattern in a working machine, such as a machine tool that is controlled by a numerical controller, learning control is carried out as a known method to improve machining accuracy in which a control deviation is converged closed to zero. In this method, the same operation pattern is repeatedly ordered, and a memory is previously stored with correction data that is obtained based on a position deviation for each control period in the second latest operation pattern period. The position deviation is converged to zero by adding correction data of a control period corresponding to the second latest operation pattern period stored in the memory to the position deviation of each control period in the latest operation pattern period (e.g., JP 7-104823A and JP 6-309021A).
In another developed method (JP 2004-227163A), a learning control start command and a learning control end command are provided in advance in a machining program so that learning control is applicable to the case where a lot of identical components continue to be machined or the case where workpieces of the same machined shape are intermittently worked many times. The learning control is applied during a time interval from the issuance of the learning control start command to the issuance of the learning control end command. The correction data are created and the position deviation is corrected based on a position deviation obtained during that time interval.
The learning control is based on the assumption that commands of the same operation pattern are repeatedly issued and a command based on this same operation pattern is outputted for each given control period. Therefore, commands for each control period in the latest operation pattern period and the second latest operation pattern period are identical, and the correction data is obtained based on the position deviation for the second latest operation pattern period. The position deviation is finally controlled to be converged to 0 by adding the correction data corresponding to the latest control period to a position deviation in the latest period.
Therefore, the command for each control period after the start of operation of the same operation pattern must be identical with the command for the execution of the preceding operation pattern. If these commands are different, the learning control is insignificant and the position deviation cannot be converged.
The learning control is not applicable in the case where any commands that change the operation pattern are involved during the time interval from the issuance of the learning control start command to the issuance of the learning control end command. If the learning control is applied, these commands must be canceled. If operation based on commands and input signals that change the operation pattern is performed during the aforesaid start-to-end time interval, the learning control sometimes may cause the correction data to fail to be added to the position deviation, thereby rather entailing some wrong machining or operation.
Conventionally, however, this learning control interval is not checked at all on the assumption that any command or signal that changes the operation pattern cannot be inputted during that interval. Thus, wrong cutting or the like may be caused by false machining programs or inappropriate signal input.